package com.buyi.easyhome.ui.view

import androidx.compose.runtime.Composable
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController

@Composable
fun EhApp(checkVersionAction: () -> Unit) {
    val navController = rememberNavController()

    NavHost(
        navController = navController,
        startDestination = "home"
    ) {
        composable("home") {
            HomeScreen(navController)
        }
        composable("settings") {
            SettingsScreen(
                navigateBack = {
                    navController.popBackStack()
                },
                checkVersionAction = checkVersionAction,
            )
        }
    }
}